const { task } = require('hardhat/config');

task(
    'block-number',
    'Prints the current block number',
    async (_, { ethers }) => {
        const blockNumber = await ethers.provider.getBlockNumber();
        console.log('Current block number: ', blockNumber);
    },
);

// task('block-number', 'Prints the current block number').setAction(
//     // async function blockNumber() {}
//     // const blockNumber = async function() => {}
//     async (_, hre) => {
//         const blockNumber = await hre.ethers.provider.getBlockNumber();
//         console.log(`Current block number: ${blockNumber}`);
//     },
// );
